#ifndef MATHLIBRARY_H
#define MATHLIBRARY_H

#include <QObject>

#ifdef MATHLIBRARY_EXPORTS
#define MATHLIBRARY_API Q_DECL_EXPORT
#else
#define MATHLIBRARY_API Q_DECL_IMPORT
#endif

class MATHLIBRARY_API Calculator : public QObject
{
    Q_OBJECT

public:
    explicit Calculator(QObject *parent = nullptr);
    ~Calculator();

    // Method that will trigger the signal
    void calculate(int a, int b);

signals:
    // This signal will be emitted when calculation is complete
    void calculationComplete(int result);
    // Signal for errors
    void calculationError(const QString &errorMessage);

private:
    // Some internal state
    bool m_isReady;
};

#endif // MATHLIBRARY_H
